class Person(object):
    def __init__(self, name, age):
        self.name = name
        self.age = age

    # 重写 str
    def __str__(self):
        return '重写 str '


stu = Person('张三', 20)
print('object: ', dir(object))
print('Person 类: ', dir(Person))
print('Person 对象: ', dir(stu))

# 和 stu.__str__() 相同
print('Person 对象1：', stu)
print('Person 对象2：', stu.__str__())

print('dir: ', dir(stu))
print('stu.dir: ', stu.__dir__())

